<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
  <style>
    .box1{
      margin-top: 100px;
      margin-left: 100px;
    }

    .box2 {
      float: left;
      margin-left: 10px;
      width: 100px;
      height: 250px;
      background-color: #bfa;

      transition: all 0.5s;
    }
    .box2:hover {
        transform: translateY(-10px);
      box-shadow: 0 0 10px #424242;
    }
  </style>
</head>
<body>
<div class="box1">
  <div class="box2"></div>
  <div class="box2"></div>
</div>
</body>
</html>